import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import store from './store'
import hljs from 'highlight.js';
import 'highlight.js/styles/atom-one-dark.css' //样式

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})	
app.directive('highlight',function (el) {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block)=>{
    hljs.highlightBlock(block)
  })
})
app.use(pinia).$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import store from './store' // 同样导入已配置的pinia实例
export function createApp() {
	const app = createSSRApp(App)
	app.use(store)
	return {
		app
	}
}
// #endif